package com.pubinfo.passbook.data.quartz.task;

import com.pubinfo.passbook.data.service.BankService;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@DisallowConcurrentExecution
public class SyncBankQueryReceiptJob implements Job {

    @Autowired
    BankService bankService;

    @SneakyThrows
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        //定时更新银行回单获取状态
        bankService.syncBankQueryReceipt();
    }
}
